<?php
class ToolsAction {
	public function cache() {
		if ($_POST) {
			foreach ( $_POST as $sKey => $sRow ) {
				Base::$oBase->Tools_clearCache_model ( $sKey );
			}
		}
	}
	
	public function converter() {
		if (preg_match ( '/^\d+$/', $_POST ['time'] )) {
			Base::$oBase->Template_assign ( 'time_val', date ( 'Y-m-d H:i:s', $_POST ['time'] ) );
		}
		if (preg_match ( '/^.+$/', trim ( $_POST ['md5'] ) )) {
			Base::$oBase->Template_assign ( 'md5_val', md5 ( trim ( $_POST ['md5'] ) ) );
		}
		Base::$oBase->Template_assign ( 'time', $_POST ['time'] );
		Base::$oBase->Template_assign ( 'md5', trim ( $_POST ['md5'] ) );
	}
}